﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Paginator.ascx.cs" Inherits="Paginator" %>

<span class="paginator">
  <asp:PlaceHolder ID="plhPageSizeDropDown" runat="server">
    Results per page 
    <asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
      <asp:ListItem Text="1" Value="1"></asp:ListItem>
      <asp:ListItem Text="10" Value="10"></asp:ListItem>
      <asp:ListItem Text="25" Value="25"></asp:ListItem>
      <asp:ListItem Text="50" Value="50" Selected="True"></asp:ListItem>
      <asp:ListItem Text="100" Value="100"></asp:ListItem>
      <asp:ListItem Text="All" Value=""></asp:ListItem>
    </asp:DropDownList>
  </asp:PlaceHolder>
  <asp:PlaceHolder ID="plhPageNavButtons" runat="server">
    &nbsp;
    <asp:LinkButton ID="lnkPrevPage" runat="server" Text="Previous" OnClick="lnkPrevPage_Click" />
    &nbsp;
    <asp:LinkButton ID="lnkNextPage" runat="server" Text="Next" OnClick="lnkNextPage_Click" />
    &nbsp;
  </asp:PlaceHolder>
  <asp:PlaceHolder ID="plhPageNumberLinks" runat="server">
    Page
    <asp:PlaceHolder ID="plhPrevPageGroup" runat="server">
      <asp:LinkButton ID="lnkPrevPageGroup" runat="server" OnClick="lnkPrevPageGroup_Click">...</asp:LinkButton>
      |
    </asp:PlaceHolder>
    <asp:Repeater ID="rptPageNumber" runat="server" OnItemDataBound="rptPageNumber_ItemDataBound" OnItemCommand="rptPageNumber_ItemCommand">
      <ItemTemplate>
        <asp:LinkButton ID="lnkPageNumber" CssClass="pageNumber" CommandName="GoToPage" runat="server"></asp:LinkButton>
        <asp:Label ID="lblPageNumber" CssClass="currentPageNumber" runat="server"></asp:Label>
      </ItemTemplate>
      <SeparatorTemplate>|</SeparatorTemplate>
    </asp:Repeater>
    <asp:PlaceHolder ID="plhNextPageGroup" runat="server">
      |
      <asp:LinkButton ID="lnkNextPageGroup" runat="server" OnClick="lnkNextPageGroup_Click">...</asp:LinkButton>
    </asp:PlaceHolder>
  </asp:PlaceHolder>
</span>
